package com.yizhang.pattern.observer.jdk;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-08-25 13:17:21
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        Forum forum = Forum.getInstance();
        forum.addObserver(new Teacher("李四"));
        forum.addObserver(new Teacher("张三"));

        forum.publish(new Question("李二狗", "观察者模式该怎么写呢？"));
    }
}
